// 自动刷新
import { useRefreshStore } from '@/store/modules/refreshStore'
import { watch } from 'vue'

export function useAutoRefresh(fetchCallback) {
  const refreshStore = useRefreshStore()
  
  watch(() => refreshStore.lastRefreshTime, () => {
    fetchCallback()
  })
  
  // 可选：返回 refreshStore 以便组件使用其他状态
  return { refreshStore }
}
